home *** CD-ROM | disk | FTP | other *** search
/ Hráč 2004 August / Hrac_72_2004-08_dvd.iso / dema / Rapid Gun / rg_setup.exe / common / cdiffuse.fx < prev    next >
Text File  |  2004-04-19  |  2KB  |  78 lines

  1. // LF2 Engine
  2. // (C) 2002-3 7FX
  3. //---------------------------------------------------------------------------
  4. #include "basic_vs.fxh"
  5. //---------------------------------------------------------------------------
  6. // Effect for rendering colored objects
  7. //---------------------------------------------------------------------------
  8. // Common parameters
  9. // Desc
  10. string desc : Description = "Shader pro objekty, ktere se budou kreslit konstantni barvou";
  11. // Requirements
  12. string req : Requirements = "Diffuse";
  13. // vertex format
  14. string vf : VertexFormat = "POSITION";
  15. //---------------------------------------------------------------------------
  16. const int cAlphaRef : AlphaRef = 0;
  17. // Line diffuse color, default white
  18. const float4 cColor : Diffuse = {1.f, 1.f, 1.f, 1.f};
  19. // CullMode - NONE=1, CW=2, CCW=3
  20. const int cCullMode : CullMode = 3; // default CCW
  21. // Matrices for fixed function technique
  22. const matrix cMtxW : World;
  23. //---------------------------------------------------------------------------
  24. //! Techniques
  25. technique vs11_ps0
  26. <
  27.     // streams for technique
  28.     string stream1 = "POSITION";
  29. >
  30. {
  31.     pass p0
  32.     <
  33.         // stream mapping
  34.         string streammap = "stream1";
  35.     >
  36.     {
  37.         VertexShader = <cBasicVS>; // use shared basic vertex shader
  38.     
  39.         AlphaRef = <cAlphaRef>;
  40.         CullMode = <cCullMode>;
  41.  
  42.         TextureFactor = <cColor>;
  43.  
  44.         ColorOp[0] = SelectArg1;
  45.         ColorArg1[0] = TFactor;
  46.         AlphaOp[0] = SelectArg1;
  47.         AlphaArg1[0] = TFactor;
  48.     }
  49. }
  50. //---------------------------------------------------------------------------
  51. //! Techniques
  52. technique vs0_ps0
  53. <
  54.     // streams for technique
  55.     string stream1 = "POSITION";
  56. >
  57. {
  58.     pass p0
  59.     <
  60.         // stream mapping
  61.         string streammap = "stream1";
  62.     >
  63.     {
  64.         // matrices
  65.         WorldTransform[0] = <cMtxW>;
  66.         
  67.         AlphaRef = <cAlphaRef>;
  68.         CullMode = <cCullMode>;
  69.         
  70.         TextureFactor = <cColor>;
  71.  
  72.         ColorOp[0] = SelectArg1;
  73.         ColorArg1[0] = TFactor;
  74.         AlphaOp[0] = SelectArg1;
  75.         AlphaArg1[0] = TFactor;
  76.     }
  77. }
  78. //---------------------------------------------------------------------------